function hb = addarchbutton(p, f)

if nargin < 2
  f = gcf;
end

ht = uitoolbar(f);
hb = uipushtool(ht, 'TooltipString', 'Get Architecture', 'UserData', p, 'ClickedCallback', 'getarch(get(gcbo, ''UserData''))');
